<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">

		<ul class="nav nav-tabs">
			<if condition="I('request.dis') eq 1">
			<li><a href="{:U('indexadmin/unwanted_user')}">不借列表</a></li>
			<else /> 
			<li><a href="{:U('indexadmin/index')}">{:L('USER_INDEXADMIN_INDEX')}</a></li>
			</if>
			<li class="active"><a>{:L('MOD')}</a></li>
		</ul>
        <form class="form-horizontal js-ajax-forms" action="{:U('indexadmin/info_save',['dis'=>I('request.dis')])}" method="post">
			<fieldset>
				<div class="tabbable">
					<div class="tab-content">
							<php>$types_dis=$type?'disabled':''</php>
							<php>$group=get_groups_admin_user();</php>
							<fieldset>
								<div class="control-group">
									<label class="control-label">姓名</label>
									<div class="controls">
									<php>
										if($group==3 || $group==8 || $group==10 || $group==13 || $group==6){
											if($user['account_status']==1){
												$mob=mb_substr($user['name'],0,1,'utf-8').'**';
											}else{
												$mob=$user['name'];
											}
										}else{
											$mob=$user['name'];
										}
										</php>
										<input type="text" disabled value="{$mob}"><span class="form-required">*  状态 
										<if condition="($user.type eq 0)"> 待绑卡
										<elseif condition="$user.type eq 1"/>上传证件照
										<elseif condition="$user.type eq 2"/>待审核
										<elseif condition="$user.type eq 3"/>学信认证
										<elseif condition="$user.type eq 4"/>填写联系信息
										<else /> 
										</if></span> 
										<if condition="($vo.type_borr eq 0)"> 待填写运营商信息
										<elseif condition="$vo.type_borr eq 1"/>无借款
										<elseif condition="$vo.type_borr eq 2"/>借款中
										<elseif condition="$vo.type_borr eq 3"/>逾期
										</if>
										<input type="hidden" name="options[id]" value="{$user.id}">
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">手机号码</label>
									<div class="controls">
									<php>
										if($group==3 || $group==8 || $group==10 || $group==13 || $group==6){
											if($user['account_status']==1){
												$mob=substr($user['mobile'],0,3).'****'.substr($user['mobile'],-4);
											}else{
												$mob=$user['mobile'];
											}
										}else{
											$mob=$user['mobile'];
										}
										$disa='disabled';
										if($group==1 || $group==10 || $group==14 || $group==2){
											$disa='name="options[mobile]"';
										}
										</php>
										<input type="text" value="{$mob}" {$disa}><span class="form-required">{$user.mob_name}&nbsp&nbsp&nbsp&nbsp服务密码&nbsp&nbsp<input type="text" name="options[mobile_pass]" value="{$user.mobile_pass}" disabled></span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">其他手机号码</label>
									<div class="controls">
									<input type="text" name="options[other_mobile]" value="{$user['other_mobile']}" />
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">推荐码</label>
									<div class="controls">
										<span class="form-required">{$isdis.code}</span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">登录密码</label>
									<div class="controls">
										<input type="text" name="options[password]" value="">
										<span class="help-block" style="color: red;">默认为空,填写则修改密码</span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">身份证</label>
									<div class="controls">
									<php>
										if($group==3 || $group==8 || $group==10 || $group==6 || $group==13){
											if($user['account_status']==1){
											$mob=substr($user['identity'],0,3).'****'.substr($user['identity'],-4);
											}else{
												$mob=$user['identity'];
											}
										}else{
											$mob=$user['identity'];
										}
									</php>
										<input type="text" disabled value="{$mob}">
									</div>
								</div>
								
								<div class="control-group">
									<label class="control-label">证件照</label>
									<div class="controls">
										<notempty name="user.url">
											<img src="{:sp_get_image_preview_url_qk($user['url'])}" style="height:36px;width: 36px;" onclick="parent.image_preview_dialog(this.src,420,420);">
										</notempty>
										<ul id="photos" class="pic-list unstyled">
											<notempty name="user['photos_url']">
												<php>$pho=json_decode($user['photos_url'],true)</php>
												<foreach name="pho" item="vo">
												<php>$img_url=sp_get_image_preview_url($vo);</php>
												<li id="savedimage{$key}">
													<input id="photo-{$key}" type="hidden" name="photos_url[]" value="{$img_url}"> 
													<img id="photo-{$key}-preview" src="{:sp_get_image_preview_url($vo)}" style="height:36px;width: 36px;" onclick="parent.image_preview_dialog(this.src);">
													<if condition="($types_di neq 'disabled')"> 
													<a href="javascript:upload_one_image('图片上传','#photo-{$key}');">替换</a>
													<a href="javascript:(function(){ $('#savedimage{$key}').remove();})();">移除</a>
													</if>
												</li>
												</foreach>
											</notempty>
										</ul>
										<if condition="($types_di neq 'disabled')"> 
										<a href="javascript:upload_multi_image('图片上传','#photos','photos-item-wrapper');" class="btn btn-small">选择图片</a>
										</if>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">银行卡号</label>
									<div class="controls">
									
									<php>
										if($group==3 || $group==8 || $group==10 || $group==13 || $group==6){
											if($user['account_status']!=0){
												$mob=substr($user['silver_number'],0,3).'****'.substr($user['silver_number'],-4);
												$silver_card='********';
												$disa='';
											}else{
												$mob=$user['silver_number'];
												$silver_card=$user['silver_card'];
												$disa='name="options[identity]"';
											}
										}else{
											$mob=$user['silver_number'];
											$silver_card=$user['silver_card'];
											$disa='name="options[identity]"';
										}
										</php>
									<input {$disa} type="text" value="{$silver_card}">
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">手机类型</label>
									<div class="controls">
									<label class="control-label" style="width:auto">{$user['photo_type']==1?'苹果':'安卓'}</label>
										
									</div>
								</div>
								<eq name="user.photo_type" value="1">
									<div class="control-group">
										<label class="control-label">AppleID</label>
										<div class="controls">
											<input type="text" name="options[apple_id]" value="{$user.apple_id}" />
										</div>
									</div>
								</eq>
								<div class="control-group">
									<label class="control-label">注册时间</label>
									<div class="controls">
										<input type="text" value="{$user.crtime}" disabled>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">学信网账号:</label>
									<div class="controls">
										<input type="text" disabled value="{$user.xuexin_name}"><span class="form-required">&nbsp&nbsp&nbsp&nbsp密码&nbsp&nbsp<input type="text" disabled value="{$user.xuexin_pass}"></span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">qq</label>
									<div class="controls">
									<php>
										if($group==3 || $group==8 || $group==10 || $group==13 || $group==6){
											if($user['account_status']!=0){
												$weixin='*******';$qqs='*******';
											}else{
												$weixin=$user['email'];$qqs=$user['qq'];
											}
										}else{
											$weixin=$user['email'];$qqs=$user['qq'];
										}
										</php>
										<input {$types_dis} type="text" value="{$qqs}">&nbsp&nbsp&nbsp&nbsp微信&nbsp&nbsp<input {$types_dis} type="text"  value="{$weixin}"></span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">教育水平</label>
									<div class="controls">
										<select {$types_dis} name="options[education]">
											<foreach name="education" item="vo">
											<php>$tpl_selected=$user['education']==$vo['education']?"selected":"";</php>
											<option value="{$vo.education}" {$tpl_selected}>{$vo.education}</option>
											</foreach>
										</select>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">常住地址</label>
									<div class="controls">
										<textarea {$types_dis} name="options[useraddr]" rows="4" cols="30">{$user.useraddr}</textarea>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">居住时长</label>
									<div class="controls">
										<select {$types_dis} name="options[addr_time]">
											<php>$tpl_selected=$user['addr_time']=='三个月'?"selected":"";</php>
											<option {$tpl_selected} value="三个月">三个月</option>
											<php>$tpl_selected=$user['addr_time']=='六个月'?"selected":"";</php>
											<option {$tpl_selected} value="六个月">六个月</option>
											<php>$tpl_selected=$user['addr_time']=='一年'?"selected":"";</php>
											<option {$tpl_selected} value="一年">一年</option>
											<php>$tpl_selected=$user['addr_time']=='两年'?"selected":"";</php>
											<option {$tpl_selected} value="两年">两年</option>
											<php>$tpl_selected=$user['addr_time']=='两年以上'?"selected":"";</php>
											<option {$tpl_selected} value="两年以上">两年以上</option>
										</select>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">父亲名字</label>
									<div class="controls">
										<input {$types_dis} type="text" name="options[parent_f_n]" value="{$user.parent_f_n}"><span class="form-required">&nbsp&nbsp&nbsp&nbsp电话号码&nbsp&nbsp<input {$types_dis} type="text" name="options[parent_f_t]" value="{$user.parent_f_t}"></span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">母亲名字</label>
									<div class="controls">
										<input {$types_dis} type="text" name="options[parent_m_n]" value="{$user.parent_m_n}"><span class="form-required">&nbsp&nbsp&nbsp&nbsp电话号码&nbsp&nbsp<input {$types_dis} type="text" name="options[parent_m_t]" value="{$user.parent_m_t}"></span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">同学A</label>
									<div class="controls">
										<input {$types_dis} type="text" name="options[classm_a_n]" value="{$user.classm_a_n}"><span class="form-required">&nbsp&nbsp&nbsp&nbsp电话号码&nbsp&nbsp<input {$types_dis} type="text" name="options[classm_a_t]" value="{$user.classm_a_t}"></span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">同学B</label>
									<div class="controls">
										<input {$types_dis} type="text" name="options[classm_b_n]" value="{$user.classm_b_n}"><span class="form-required">&nbsp&nbsp&nbsp&nbsp电话号码&nbsp&nbsp<input {$types_dis} type="text" name="options[classm_b_t]" value="{$user.classm_b_t}"></span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">是否禁止登录</label>
									<div class="controls">
										<select name="options[user_status]">
										<php>$html_cache_on_checked=$user_status=$user['user_status']=='0'?"selected":"";</php>
										<option value="0" {$html_cache_on_checked}>禁用</option>
										<php>$html_cache_on_checked=$user['user_status']=='1'?"selected":"";</php> 
										<option value="1" {$html_cache_on_checked}>正常</option>
									</select>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">芝麻信用分</label>
									<div class="controls">
										<input type="text" name="options[sesame_score]" value="{$user['sesame_score']}">
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">信用额度</label>
									<div class="controls">
										<input type="number" name="options[credit_lines]" value="{$user['credit_lines']}">
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">资料备注</label>
									<div class="controls">
										<textarea name="options[messgae]" rows="4" cols="30"></textarea>
									</div>
								</div>
							</fieldset>
					</div>
				</div>

				<div class="form-actions">
					<button type="submit" class="btn btn-primary  js-ajax-submit">{:L("SAVE")}</button>
				</div>
			</fieldset>
		</form>
		
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script type="text/html" id="photos-item-wrapper">
	<li id="savedimage{id}">
		<input id="photo-{id}" type="hidden" name="photos_url[]" value="{filepath}"> 
		<img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;" onclick="parent.image_preview_dialog(this.src);">
		<a href="javascript:upload_one_image('图片上传','#photo-{id}');">替换</a>
		<a href="javascript:(function(){$('#savedimage{id}').remove();})();">移除</a>
	</li>
</script>
</body>
</html>